<div class="sectionTitle" xmlns="http://www.w3.org/1999/html">
  <h1>Opinion expressed! </h1>
</div>
<div class="edge">
  <img src="../../assets/edge.png"></img>
</div>

<% ratings = LectureRating.find_all_by_lecture_id(params[:lecture_id])  %>

<p>Showing comments for lecture <b><%= Lecture.find_by_id(params[:lecture_id]).title %>:</b></p>

<% ratings.each do |rating| %>
    <% comment = rating.comment %>
    <% if comment != "" %>
       <div class="lectureDetails">
           <% userID = rating.user_id %>
           <b><%= User.find_by_id(1).nickname %></b> said at <%= rating.created_at %> <br />
           <p><i>"<%= comment %>"</i></p>
       </div>
    <% end %>
<% end %>

<p><%= link_to 'Back', lectures_path %></p>